refs: Use G_IO_ERROR_NOT_FOUND when a ref lookup fails
authorColin Walters <walters@verbum.org>
Tue, 6 Jan 2015 23:47:04 +0000 (18:47 -0500)
committerColin Walters <walters@verbum.org>
Tue, 6 Jan 2015 23:47:04 +0000 (18:47 -0500)
rpm-ostree had code to check for this, which didn't actually work.

I don't see a no backwards compatibility concern in changing this, as
it's unlikely a caller would try to sensibly disambiguate FAILED.

src/libostree/ostree-repo-refs.c

index ca584b6626d3825929b73d0fb5890b0a2fcfac46..5588c8367f89b8421e842273b00c94d91d1c31c7 100644 (file)
@@ -259,7 +259,7 @@ resolve_refspec_fallback (OstreeRepo     *self,
     }
   else if (!allow_noent)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
                    "Refspec '%s%s%s' not found",
                    remote ? remote : "",
                    remote ? ":" : "",